<div id="menu">
	<br/>
<?php
	if (isset($_SESSION['nom']) AND isset($_SESSION['prenom'])){
		try
		{
		    $bdd = new PDO('mysql:host=localhost;dbname=socialnet', 'root', 'root');
		}
		catch (Exception $e)
		{
			die('Erreur : ' . $e->getMessage());
		}
		
		$req = $bdd->query("SELECT id_user,photo_path FROM profil") or die(print_r($bdd->errorInfo()));
		while($datas=$req->fetch()) {
			if($datas['id_user']==$_SESSION['id'])
				if (empty($datas['photo_path']))
					echo " Aucune photo de profil.<br/>";
				else
					echo "<a href='../menu/profil.php' style='margin-left: 15%'> <img id='id_img' src='../".$datas['photo_path']."' width='120px' height='150px' alt=\"Erreur lors de l'affichage de la photo de profil\" title=\"Photo de profil de ".$_SESSION['nom']." ".$_SESSION['prenom']." \" /> </a><br/><br/>";
		}
	}
?>
	<a href="../index/index.php" style="margin-left: 10%">Accueil</a><br/>
<?php
	if (isset($_SESSION['nom']) AND isset($_SESSION['prenom'])){
?>
	<a href="../menu/profil.php" style="margin-left: 10%">Profil</a><br/>
	<a href="../menu/display_friend.php" style="margin-left: 10%">Amis</a><br/>
	<a href="../menu/event.php" style="margin-left: 10%">Evénements</a><br/>
	<a href="../chat/chat.php" style="margin-left: 10%">Chat</a><br/>
<?php 
	}
?>
</div>